package game.entity.process;

import java.util.List;

import common.Vector;

import game.entity.Entity_A;
import game.entity.mob.Mob_Entity;
import game.gamestate.GameState;
import game.physics.SimulationBody;

public class MovementProcess implements EntityProcessor_I<Mob_Entity> {
	public MovementProcess() {
	}

	@Override
	public int process(List<Mob_Entity> entities, GameState gameState, int time) {
		if(entities == null) {
			return 0;
		}

		float scaledTime = (float)time / 1000;
		Vector velocity = new Vector();
		for(Mob_Entity mob : entities) {
			mob.Body.Velocity.copyTo(velocity);
			velocity.scale(scaledTime);
			mob.Body.move(velocity);
		}
		return entities.size();
	}
}